# empirical data 408 rows by 26 columns (p = 26)mcnally <-read.csv("../data/McNally.csv") # check the data#glimpse(mcnally)skimr::skim(mcnally)
Data summary
Name
mcnally
Number of rows
408
Number of columns
26
_______________________
Column type frequency:
numeric
26
________________________
Group variables
None
Variable type: numeric
skim_variable
n_missing
complete_rate
mean
sd
p0
p25
p50
p75
p100
hist
onset
0
1
1.20
1.07
0
0
1
2.00
3
▇▆▁▆▃
middle
0
1
1.44
1.07
0
0
2
2.00
3
▆▃▁▇▃
late
0
1
0.81
1.07
0
0
0
2.00
3
▇▂▁▂▂
hypersom
0
1
1.01
0.99
0
0
1
2.00
3
▇▇▁▅▂
sad
0
1
1.55
0.94
0
1
2
2.00
3
▃▇▁▇▅
decappetite
0
1
0.49
0.73
0
0
0
1.00
3
▇▃▁▁▁
incappetite
0
1
0.44
0.87
0
0
0
0.00
3
▇▁▁▁▁
weightloss
0
1
0.50
0.94
0
0
0
1.00
3
▇▁▁▁▁
weightgain
0
1
0.67
1.04
0
0
0
1.00
3
▇▂▁▂▁
concen
0
1
1.48
0.87
0
1
1
2.00
3
▃▇▁▇▂
guilt
0
1
1.56
1.17
0
1
1
3.00
3
▆▇▁▃▇
suicide
0
1
0.63
0.82
0
0
0
1.00
3
▇▅▁▂▁
anhedonia
0
1
1.27
1.05
0
0
1
2.00
3
▇▇▁▅▅
fatigue
0
1
1.33
0.95
0
1
1
2.00
3
▅▇▁▆▃
retard
0
1
0.66
0.81
0
0
0
1.00
3
▇▅▁▂▁
agitation
0
1
1.10
0.93
0
0
1
2.00
3
▅▇▁▃▂
obtime
0
1
2.95
0.89
0
2
3
4.00
4
▁▁▆▇▇
obinterfer
0
1
2.69
0.83
0
2
3
3.00
4
▁▁▆▇▃
obdistress
0
1
2.81
0.76
0
2
3
3.00
4
▁▁▅▇▃
obresist
0
1
1.98
0.93
0
1
2
2.25
4
▁▃▇▃▁
obcontrol
0
1
2.67
0.76
0
2
3
3.00
4
▁▁▆▇▂
comptime
0
1
2.60
0.93
0
2
3
3.00
4
▁▂▇▇▅
compinterf
0
1
2.58
0.88
0
2
3
3.00
4
▁▂▆▇▂
compdis
0
1
2.71
0.84
0
2
3
3.00
4
▁▁▅▇▂
compresis
0
1
2.16
0.89
0
2
2
3.00
4
▁▂▇▅▁
compcont
0
1
2.60
0.76
0
2
3
3.00
4
▁▁▆▇▂
See code here.
# separate dep / ocd symptomsdepression <- mcnally[,1:16]ocd <- mcnally[,17:26]
See code here.
## run ccd algorithm on entire mcnally (discrete)ccd_mcnally <-ccdKP(df=mcnally, dataType ="discrete") matccd_mcnally <-CreateAdjMat(ccd_mcnally, p =26)## run fci algorithm on entire mcnally (discrete)fci_mcnally <-tetradrunner(algoId ='fci', df = mcnally,dataType ='discrete')matfci_mcnally <-CreateAdjMat(fci_mcnally, p =ncol(mcnally))## run ccd on depression symptomsccd_mcnally_dep <-ccdKP(df=depression, dataType ="discrete") mat_mcnally_dep <-CreateAdjMat(ccd_mcnally_dep, p =ncol(depression))## run fci on depression symptomsfci_mcdep <-tetradrunner(algoId ='fci', df = depression,dataType ='discrete')matfci_mcdep <-CreateAdjMat(fci_mcdep, p =ncol(depression))## run ccd on ocd symptomsccd_mcnally_ocd <-ccdKP(df=ocd, dataType ="discrete") mat_mcnally_ocd <-CreateAdjMat(ccd_mcnally_ocd, p =ncol(ocd))## run fci on ocd symptomsfci_mcocd <-tetradrunner(algoId ='fci', df = ocd,dataType ='discrete')matfci_mcocd <-CreateAdjMat(fci_mcocd, p =ncol(ocd))
See code here.
## CCD PAG for the entire McnallyplotPAG(ccd_mcnally, matccd_mcnally)
Figure 9. CCD PAG on entire McNally data
See code here.
## FCI PAG for the entire McnallyplotPAG(fci_mcnally, matfci_mcnally)
Figure 10. FCI PAG on entire McNally data
See code here.
## CCD PAG for the depression symptomsplotPAG(ccd_mcnally_dep, mat_mcnally_dep) ## FCI PAG for the depression symptomsplotPAG(fci_mcdep, matfci_mcdep)## CCD PAG for the ocd symptomsplotPAG(ccd_mcnally_ocd, mat_mcnally_ocd) ## FCI PAG for the ocd symptomsplotPAG(fci_mcocd, matfci_mcocd)
(a) CCD PAG_depression symptoms
(b) FCI PAG_depression symptoms
(c) CCD PAG_OCD symptoms
(d) FCI PAG_OCD symptoms
Figure 11. Separate PAGs on depression and OCD symptoms